<!--# include Template('header'); #-->
<!--header----main-->
<div id="content">
      <div id="left" style="border:#a8b5bd solid 1px; border-top:none; width:680px;">
<!--# if($action=='upload'){#-->
          <div class="pos">个人管理 &rsaquo;&rsaquo; 我的上传</div>
		  <div class="content_pos"></div>
          <div class="list">
<!--#if(empty($myupload)){#-->
<div style="text-align:center"><img src="images/sad.png" align="absmiddle" /><span style="font-size:14px; color:#FF0000; font-weight:bold;"> 您还没有上传任何{$very[contentName]}！</span></div>
<!--#} else {#-->
<div id="myupload">
<table width="100%" cellspacing="0">
<tr id="listtitle">
<td>&nbsp;</td>
<td>目录</td>
<td>标题</td>
<td>添加时间</td>
<td>发布状态</td>
<td>操作</td>
</tr>
<!--#foreach($myupload as $val){
$val[ifpub] = $val[ifpub] ? '已发布' : '<span style="color:red">待审核</span>';
#-->
<tr>
<td><img src="images/icon/content.png" /></td>
<td>{$catedb[$val[cid]][cname]}
</td>
<td><a href="view.php?cid=$val[cid]&tid=$val[tid]">$val[title]</a>($val[resnum])<!--# if($val[ifprivate]){#--><img src="images/icon/private.png" align="absmiddle" title="私有{$very[contentName]}" /><!--#}#-->
</td>
<td>{@get_date($val[postdate],'m-d H:i')@}</td>
<td>$val[ifpub]</td>
<td class="operate">
<a href="upload.php?action=edit&tid=$val[tid]"><img src="images/admin/edit.png" align="absmiddle" alt="编辑" /></a>
<a href="upload.php?action=del&tid=$val[tid]"><img src="images/admin/delete.png" align="absmiddle" alt="删除" onClick="return confirm('您确定要删除此{$very[contentName]}？');"/></a>
</td>
</tr>
<!--#}#-->
</table>
</div>
<!--# }#-->
          </div>
<!--#} elseif($action == 'fav') {#-->
          <div class="pos">个人管理 &rsaquo;&rsaquo; 我的收藏</div>
		  <div class="content_pos"></div>
          <div class="list">
<!--#if(empty($myfav)){#-->
<div style="text-align:center"><img src="images/sad.png" align="absmiddle" /><span style="font-size:14px; color:#FF0000; font-weight:bold;"> 暂无收藏{$very[contentName]}！</span></div>
<!--#} else {#-->
<div id="myupload">
<table width="100%" cellspacing="0">
<tbody id="favor">
<tr id="listtitle">
<td>&nbsp;</td>
<td>目录</td>
<td>标题</td>
<td>添加时间</td>
<td>提供者</td>
<td>操作</td>
</tr>
<!--#foreach($myfav as $val){#-->
<tr id="fav_{$val[tid]}">
<td><img src="images/icon/content.png" /></td>
<td>{$catedb[$val[cid]][cname]}</td>
<td><a href="view.php?cid=$val[cid]&tid=$val[tid]">$val[title]</a>($val[resnum])</td>
<td>{@get_date($val[postdate],'m-d H:i')@}</td>
<td>$val[publisher]</td>
<td class="operate">
<a href="javascript:;" onclick="removeFav($val[tid]);"><img src="images/admin/delete.png" align="absmiddle" alt="删除" onClick="return confirm('您确定要删除此收藏{$very[contentName]}？');"/></a>
</td>
</tr>
<!--#}#-->
</tbody>
</table>
</div>
<!--# }#-->
          </div>
<!--# } else {#-->
<div class="pos">个人管理 &rsaquo;&rsaquo; 账号维护</div>
		  <div class="content_pos"></div>
<form method="post" action="my.php?action=edit">
<div style="width:90%; margin:10px auto;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="line">
  <td colspan="2">您好， $my[username]，您属于 {$group[$my[groupid]][groupname]} 用户组，请如实填写您的各项资料。<BR />
  <br /> </td>
</tr>
<tr class="line">
  <td width="25%">登录密码</td>
  <td width="75%"><input name="new_password" type="password" id="new_password" class="input" />
  (如果不修改清留空)</td>
</tr>
<tr class="line">
  <td>密码确认</td>
  <td><input name="new_password2" type="password" id="new_password2" class="input" /></td>
</tr>
<tr class="line">
  <td>真实姓名</td>
  <td><input name="realname" type="text" class="input" id="realname" value="$my[realname]" /></td>
</tr>
<tr class="line">
  <td>身份证号码</td>
  <td><input name="idcard" type="text" class="input" id="idcard" value="$my[idcard]" size="30" /></td>
</tr>
<tr class="line">
  <td>联系电话</td>
  <td><input name="telephone" type="text" class="input" id="telephone" value="$my[telephone]" /></td>
</tr>
<tr class="line">
  <td>E-mail</td>
  <td><input name="new_email" type="text" class="input" id="new_email" value="$my[email]" /></td>
</tr>
</table>
<div style="text-align:center; padding:10px;">
<input type="reset" class="btn" value="重置" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" class="btn" value="修改" /></div>
</div>
</form>	  
<!--# }#-->
<!--分页符-->$pages
      </div>
<div class="right">
<!--# include Template('sidebar-type'); #-->
<!--# include Template('my-right2'); #-->
</div>
</div>
<script type="text/javascript" src="script/prototype.js"></script>
<script language="javascript">
var removeTid = '';
function removeFav(tid)
{
	//alert(tid);
	removeTid = tid;
	new Ajax.Request("my.php",{method: 'GET',parameters: "tid=" + tid + "&action=removefav",onComplete: removeOK});
}

function removeOK(res)
{
	var msg = res.responseText;
	//alert(msg);
	if(msg == 1)
	{
		var favorTable = document.getElementById('favor');
		var Tr = document.getElementById('fav_'+removeTid);
		favorTable.removeChild(Tr);
	}
	else
	{
		alert('删除失败。');
	}
}
</script>
<div class="clear"></div>
<!---main----foot-->
<!--# include Template('foot');#-->
